promisify = require('@/util/promisify')

module.exports = (weex, s)->
    d = []
    for name in s.split(" ")
        mod = weex.requireModule name
        r = {}
        for k of mod
            if k.endsWith("EventListener")
                continue
            r[k] = promisify(mod, k)
        d.push r
    return d
